import Vue from 'vue'
import App from './App'
import store from './store'

import uView from 'uview-ui' // ui框架 https://uviewui.com/
Vue.use(uView)

Vue.config.productionTip = false // 设置为 false 以阻止 vue 在启动时生成生产提示
App.mpType = 'app'
const app = new Vue({
  store,
  ...App,
})

// 规则检验
import test from '@/utils/util.js'

// http接口API集中管理引入部分
import api from '@/utils/http.api.js'

//点击前回调是否需要登录
import judgeLogin from '@/utils/judgeLogin.js'

//路由跳转方法
import route from '@/utils/route.js'

const $edu = {
  test,
  api,
  judgeLogin,
  route,
}
Vue.prototype.$edu = $edu

// 注册全局滚动组件/
import eduMescrollMixin from '@/uni_modules/mescroll/mescroll-mixins.js'
Vue.mixin(eduMescrollMixin)

// 引入uView对小程序分享的mixin封装
let mpShare = require('uview-ui/libs/mixin/mpShare.js')
Vue.mixin(mpShare)

//注册filter
import * as filters from '@/utils/filters.js'
Object.keys(filters).forEach((key) => {
  Vue.filter(key, filters[key])
})

app.$mount()
